import * as React from "react"

import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
import { Shell } from "@/components/shell"
import { InformationButton } from "@/components/information/information-button"
import { VendorFormStatusTable } from "@/components/form-data-stat/form-data-stat-table"
import { useTranslation } from "@/i18n"

interface edpProgressPageProps {
    params: Promise<{ lng: string }>
}

export default async function IndexPage(props: edpProgressPageProps) {
  const { lng } = await props.params
  const { t } = await useTranslation(lng, 'menu')

  return (
    <Shell className="gap-2">
      <div className="flex items-center justify-between space-y-2">
        <div className="flex items-center gap-2">
          <h2 className="text-2xl font-bold tracking-tight">{t('menu.engineering_management.vendor_progress')}</h2>
          <InformationButton pagePath="evcp/edp-progress" />
        </div>
      </div>

      <React.Suspense
        fallback={
          <DataTableSkeleton
            columnCount={6}
            searchableColumnCount={1}
            filterableColumnCount={0}
            cellWidths={["16rem", "8rem", "8rem", "8rem", "8rem", "8rem"]}
            shrinkZero
          />
        }
      >
        <VendorFormStatusTable  />
      </React.Suspense>
    </Shell>
  )
}
